Recently, an approach for cloning (and de-cloning of files in a file system) was described in US 2012/0130949 A1 which relates to a file cloning mechanism that allows for quickly creating copies (clones) of files within a file system, such as when a user makes a copy of a file. A clone of a source object can be at least initially represented by a structure containing references to various elements of the source object (e.g., indirect nodes, direct nodes, and data blocks). Both read-only and mutable clones can be created. The source file and the clone initially share such elements and continue to share unmodified elements as changes are made to the source file or mutable clone. None of the user data blocks or the metadata blocks describing the data stream (i.e., the indirect/direct nodes) associated with the source file need to be copied at the time the clone is created. Also, at appropriate times, cloned files may be “de-cloned.” The contents of US 2012/0130949 A1 are herewith incorporated by reference and the mechanism will be summarized in more detail below.
In a data storage system, some or all objects of a file system (e.g. a source file system) may be replicated to another file system (exemplarily referred to herein as the “target file system”), for example, to allow for archiving, backup, maintenance, or disaster recovery. Unlike data mirroring, where data is stored in two separate locations, replication of data may generally involve the creation of a copy of a source object in the target file system, wherein the target object may be stored in a manner that is quite different from the manner in which the source object is stored.
For example, the source object may be stored in non-contiguous blocks while the target object may be stored in contiguous blocks because all blocks for the target object may be allocated at one time whereas the blocks for the source object may have been allocated over an extended period of time and hence may have been allocated from different areas of storage.
Generally speaking, file system replication can be performed at the file level or at the object (sub-file) level. Examples of file-level and object-level replication are discussed generally in Hitachi NAS Platform Software: BlueArc® JetMirror datasheet available from Hitachi Data Systems.
Clone files may often be handled like any other regular files during an object-based replication and therefore may be replicated as a deep copy on the target file system. Such deep copying of the clone files results in creating clone files that do not share any data blocks with their snapshot-files, thus increasing their storage cost on the target file system.